package fruit;

public class TestMain {
    public static void main(String[] args) {
        Apple appleA = new Apple(5);
        Strawberry strawberryA = new Strawberry(1);
        System.out.print("顾客 A 在超市购买" + appleA.fruitName + appleA.number + "斤," + strawberryA.fruitName + strawberryA.number + "斤,需支付");
        System.out.println(appleA.price() + strawberryA.price() + "元");

        Apple appleB = new Apple(5);
        Strawberry strawberryB = new Strawberry(1);
        Mango mangoB = new Mango(3);
        System.out.print("顾客 B 在超市购买" + appleB.fruitName + appleB.number + "斤," + mangoB.fruitName + mangoB.number + "斤," + strawberryB.fruitName + strawberryB.number + "斤,需支付");
        System.out.println(appleB.price() + strawberryB.price() + mangoB.price() + "元");

        Apple appleC = new Apple(5);
        Strawberry strawberryC = new Strawberry(1);
        Discount disStrawberryC = new Discount(strawberryC.price());
        Mango mangoC = new Mango(3);
        System.out.print("顾客 C 在超市购买" + appleC.fruitName + appleC.number + "斤," + mangoC.fruitName + mangoC.number + "斤," + strawberryC.fruitName + strawberryC.number + "斤,需支付");
        System.out.println(appleC.price() + disStrawberryC.price() + mangoC.price() + "元");

        Apple appleD = new Apple(5);
        Strawberry strawberryD = new Strawberry(1);
        Mango mangoD = new Mango(3);
        MaxOut maxOut = new MaxOut(appleD.price() + strawberryD.price() + mangoD.price());
        System.out.print("顾客 D 在超市购买" + appleD.fruitName + appleD.number + "斤," + mangoD.fruitName + mangoD.number + "斤," + strawberryD.fruitName + strawberryD.number + "斤,需支付");
        System.out.println(maxOut.price() + "元");
    }
}
